package game;

import java.util.ArrayList;
import java.util.List;

import org.newdawn.slick.SlickException;

import entities.AimingEnemy;
import entities.BulletExplosionEnemy;
import entities.CannonEnemy;
import entities.CircleFireEnemy;
import entities.Enemy;
import entities.FollowingEnemy;
import entities.FollowingEnemyHard;
import entities.LarvaBoss;
import entities.Player;
import entities.ShootingEnemy;
import entities.SinusEnemy;

public class WaveEditor {

	public static List<EnemyWave> generateWaves(Player player) throws SlickException {
		ArrayList<EnemyWave> waves = new ArrayList<EnemyWave>();
		
		// wave 1
		ArrayList<Enemy> enemies1 = new ArrayList<Enemy>();
		enemies1.add(new ShootingEnemy(.5f));
		enemies1.add(new ShootingEnemy(.5f));
		enemies1.add(new ShootingEnemy(.5f));
		enemies1.add(new AimingEnemy(player));
		enemies1.add(new SinusEnemy());
		enemies1.add(new SinusEnemy());
		enemies1.add(new AimingEnemy(player));
		enemies1.add(new ShootingEnemy(.5f));
		enemies1.add(new ShootingEnemy(.5f));
		enemies1.add(new ShootingEnemy(.5f));
		enemies1.add(new AimingEnemy(player));
		enemies1.add(new SinusEnemy());
		enemies1.add(new SinusEnemy());
		enemies1.add(new AimingEnemy(player));
		enemies1.add(new ShootingEnemy(.5f));
		enemies1.add(new ShootingEnemy(.5f));
		enemies1.add(new ShootingEnemy(.5f));
		enemies1.add(new AimingEnemy(player));
		EnemyWave wave1 = new DelayedSpawnWave(enemies1, 1, 1500, 500);
		waves.add(wave1);
		
		// wave 2
		ArrayList<Enemy> enemies2 = new ArrayList<Enemy>();
		enemies2.add(new ShootingEnemy(.5f));
		enemies2.add(new ShootingEnemy(.5f));
		enemies2.add(new SinusEnemy());
		enemies2.add(new SinusEnemy());
		enemies2.add(new AimingEnemy(player));
		enemies2.add(new ShootingEnemy(.5f));
		enemies2.add(new AimingEnemy(player));
		enemies2.add(new SinusEnemy());
		enemies2.add(new ShootingEnemy(.5f));
		enemies2.add(new ShootingEnemy(.5f));
		enemies2.add(new SinusEnemy());
		enemies2.add(new SinusEnemy());
		enemies2.add(new AimingEnemy(player));
		enemies2.add(new ShootingEnemy(.5f));
		enemies2.add(new AimingEnemy(player));
		enemies2.add(new SinusEnemy());
		enemies2.add(new ShootingEnemy(.5f));
		enemies2.add(new ShootingEnemy(.5f));
		enemies2.add(new SinusEnemy());
		enemies2.add(new SinusEnemy());
	
		EnemyWave wave2 = new DelayedSpawnWave(enemies2, 2, 1000, 300);
		waves.add(wave2);

		// wave 3
		ArrayList<Enemy> enemies3 = new ArrayList<Enemy>();
		enemies3.add(new ShootingEnemy(1));
		enemies3.add(new ShootingEnemy(1));
		enemies3.add(new ShootingEnemy(1));
		enemies3.add(new SinusEnemy());
		enemies3.add(new SinusEnemy());
		enemies3.add(new SinusEnemy());
		enemies3.add(new FollowingEnemy(player));
		enemies3.add(new FollowingEnemy(player));
		enemies3.add(new FollowingEnemy(player));
		enemies3.add(new SinusEnemy());
		enemies3.add(new SinusEnemy());
		enemies3.add(new SinusEnemy());
		enemies3.add(new ShootingEnemy(1));
		enemies3.add(new ShootingEnemy(1));
		enemies3.add(new ShootingEnemy(1));
		enemies3.add(new FollowingEnemy(player));
		enemies3.add(new FollowingEnemy(player));
		enemies3.add(new FollowingEnemy(player));
		EnemyWave wave3 = new DelayedSpawnWave(enemies3, 3, 3000, 50);
		waves.add(wave3);
		
		// wave 4
		ArrayList<Enemy> enemies4 = new ArrayList<Enemy>();
		enemies4.add(new AimingEnemy(player));
		enemies4.add(new AimingEnemy(player));
		enemies4.add(new AimingEnemy(player));
		enemies4.add(new ShootingEnemy(2));
		enemies4.add(new BulletExplosionEnemy(15));
		enemies4.add(new AimingEnemy(player));
		enemies4.add(new AimingEnemy(player));
		enemies4.add(new AimingEnemy(player));
		enemies4.add(new FollowingEnemyHard(player));
		enemies4.add(new AimingEnemy(player));
		enemies4.add(new AimingEnemy(player));
		enemies4.add(new BulletExplosionEnemy(15));
		enemies4.add(new AimingEnemy(player));
		enemies4.add(new AimingEnemy(player));
		enemies4.add(new AimingEnemy(player));
		EnemyWave wave4 = new DelayedSpawnWave(enemies4, 1, 300, 200);
		waves.add(wave4);
		
		// wave 5
		ArrayList<Enemy> enemies5 = new ArrayList<Enemy>();
		enemies5.add(new CircleFireEnemy(10));
		enemies5.add(new SinusEnemy());
		enemies5.add(new ShootingEnemy(1));
		enemies5.add(new ShootingEnemy(1));
		enemies5.add(new CircleFireEnemy(10));
		enemies4.add(new BulletExplosionEnemy(20));
		enemies5.add(new AimingEnemy(player));
		enemies5.add(new AimingEnemy(player));
		enemies5.add(new AimingEnemy(player));
		enemies5.add(new AimingEnemy(player));
		enemies5.add(new ShootingEnemy(1));
		enemies5.add(new CircleFireEnemy(10));
		enemies5.add(new SinusEnemy());
		enemies5.add(new ShootingEnemy(1));
		enemies5.add(new ShootingEnemy(1));
		enemies4.add(new BulletExplosionEnemy(20));
		enemies5.add(new CircleFireEnemy(10));
		enemies5.add(new AimingEnemy(player));
		enemies5.add(new AimingEnemy(player));
		enemies5.add(new AimingEnemy(player));
		EnemyWave wave5 = new DelayedSpawnWave(enemies5, 2, 1800, 200);
		waves.add(wave5);
		
		// wave 6
		ArrayList<Enemy> enemies6 = new ArrayList<Enemy>();
		enemies6.add(new CircleFireEnemy(10));
		enemies6.add(new CircleFireEnemy(10));
		enemies6.add(new ShootingEnemy(3));
		enemies6.add(new CircleFireEnemy(10));
		enemies6.add(new AimingEnemy(player));
		enemies6.add(new AimingEnemy(player));
		enemies6.add(new FollowingEnemy(player));
		enemies6.add(new FollowingEnemy(player));
		enemies6.add(new FollowingEnemyHard(player));
		EnemyWave wave6 = new DelayedSpawnWave(enemies6, 3, 2000, 200);
		waves.add(wave6);
		
		// wave 7 
		ArrayList<Enemy> enemies7 = new ArrayList<Enemy>();
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		enemies7.add(new AimingEnemy(player));
		EnemyWave wave7 = new DelayedSpawnWave(enemies7, 8, 600, 1);
		waves.add(wave7);
		
		// wave 8
		ArrayList<Enemy> enemies8 = new ArrayList<Enemy>();
		enemies8.add(new SinusEnemy());
		enemies8.add(new SinusEnemy());
		enemies8.add(new SinusEnemy());
		enemies8.add(new SinusEnemy());
		enemies8.add(new SinusEnemy());
		
		enemies8.add(new CircleFireEnemy(15));		
		enemies8.add(new SinusEnemy());
		enemies8.add(new CircleFireEnemy(15));		
		enemies8.add(new SinusEnemy());
		enemies8.add(new CircleFireEnemy(15));		
	
		enemies8.add(new CircleFireEnemy(15));
		enemies8.add(new CircleFireEnemy(15));
		enemies8.add(new BulletExplosionEnemy(30));
		enemies8.add(new CircleFireEnemy(15));
		enemies8.add(new BulletExplosionEnemy(30));
		
		enemies8.add(new BulletExplosionEnemy(30));
		enemies8.add(new BulletExplosionEnemy(30));
		enemies8.add(new BulletExplosionEnemy(30));
		enemies8.add(new BulletExplosionEnemy(30));
		enemies8.add(new BulletExplosionEnemy(30));
		
		EnemyWave wave8 = new DelayedSpawnWave(enemies8, 5, 2000, 1);
		waves.add(wave8);
		
		// wave 9
		ArrayList<Enemy> enemies9 = new ArrayList<Enemy>();
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new CircleFireEnemy(15));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new CircleFireEnemy(15));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new BulletExplosionEnemy(36));
		
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new CircleFireEnemy(15));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new CircleFireEnemy(15));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new BulletExplosionEnemy(36));
		
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new CircleFireEnemy(15));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new CircleFireEnemy(15));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new BulletExplosionEnemy(36));
		
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new CircleFireEnemy(15));
		enemies9.add(new SinusEnemy());
		enemies9.add(new SinusEnemy());
		enemies9.add(new SinusEnemy());
		enemies9.add(new SinusEnemy());
		enemies9.add(new CircleFireEnemy(15));
		enemies9.add(new SinusEnemy());
		enemies9.add(new SinusEnemy());
		enemies9.add(new SinusEnemy());
		enemies9.add(new SinusEnemy());
		enemies9.add(new BulletExplosionEnemy(36));
		
		enemies9.add(new SinusEnemy());
		enemies9.add(new SinusEnemy());
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new CircleFireEnemy(15));
		enemies9.add(new SinusEnemy());
		enemies9.add(new SinusEnemy());
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new CircleFireEnemy(15));
		enemies9.add(new SinusEnemy());
		enemies9.add(new SinusEnemy());
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new BulletExplosionEnemy(40));
		
		enemies9.add(new SinusEnemy());
		enemies9.add(new SinusEnemy());
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new CircleFireEnemy(15));
		enemies9.add(new SinusEnemy());
		enemies9.add(new SinusEnemy());
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new CircleFireEnemy(15));
		enemies9.add(new SinusEnemy());
		enemies9.add(new SinusEnemy());
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new BulletExplosionEnemy(50));
		
		enemies9.add(new SinusEnemy());
		enemies9.add(new SinusEnemy());
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new CircleFireEnemy(15));
		enemies9.add(new SinusEnemy());
		enemies9.add(new SinusEnemy());
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new CircleFireEnemy(15));
		enemies9.add(new SinusEnemy());
		enemies9.add(new SinusEnemy());
		enemies9.add(new SinusEnemy());
		enemies9.add(new AimingEnemy(player));
		enemies9.add(new AimingEnemy(player));

		EnemyWave wave9 = new DelayedSpawnWave(enemies9, 5, 4000, 100);
		waves.add(wave9);
		
		// wave 10
		ArrayList<Enemy> enemies10 = new ArrayList<Enemy>();
		enemies10.add(new BulletExplosionEnemy(36));
		enemies10.add(new CircleFireEnemy(20));
		enemies10.add(new CircleFireEnemy(20));
		enemies10.add(new BulletExplosionEnemy(36));
		enemies10.add(new BulletExplosionEnemy(25));

		enemies10.add(new BulletExplosionEnemy(25));
		enemies10.add(new CircleFireEnemy(30));
		enemies10.add(new CircleFireEnemy(30));		
		enemies10.add(new BulletExplosionEnemy(25));
		enemies10.add(new BulletExplosionEnemy(25));
		
		enemies10.add(new BulletExplosionEnemy(25));
		enemies10.add(new BulletExplosionEnemy(25));
		enemies10.add(new BulletExplosionEnemy(25));
		enemies10.add(new BulletExplosionEnemy(25));
		enemies10.add(new BulletExplosionEnemy(25));

		enemies10.add(new BulletExplosionEnemy(25));
		enemies10.add(new BulletExplosionEnemy(25));
		enemies10.add(new BulletExplosionEnemy(25));
		enemies10.add(new BulletExplosionEnemy(25));
		enemies10.add(new BulletExplosionEnemy(25));
				
		EnemyWave wave10 = new DelayedSpawnWave(enemies10, 5, 4000, 500);
		waves.add(wave10);
		// boss wave
		ArrayList<Enemy> bossWaveEnemies = new ArrayList<Enemy>();
		bossWaveEnemies.add(new SinusEnemy());
		
		EnemyWave waveBoss = new BossWave(new LarvaBoss(),bossWaveEnemies, 750, 1000);
		waves.add(waveBoss);
		
		return waves;
	}

}
